David Karlins
Introduction
Is advanced Web design art, or is it technology? The answer is: It's both.
I find it helpful to invoke the metaphor of a sculptor. If the sculptor doesn't understand the technology and technique for working with the material (such as metal, wood, or clay), then no matter how creative his or her artistic vision is, the sculpture will collapse.
In that spirit, we'll combine design and technology in this lesson. We'll start by defining and applying a color scheme to our website, and then we'll get technical.
In Lesson 1, I emphasized the importance of shopping for a remote Web hosting server. In this lesson, we'll explore the options for remote hosting, contract for a (free) hosting service, and upload our sites.
But before posting, we need to make sure our websites are ready for the world. That means, among other things:
Are all these little tasks important? Yes. Carefully testing your site before uploading helps you to make it inviting, impressive, and professional. And, to get negative for a moment, any of these things can severely undermine the impact of even a well-designed site that has appealing content:
Of course, as you create page content, you check for mistakes. You test pages in a browser on your local computer before uploading them. But as websites grow to dozens, hundreds, or thousands of pages, you need to rely on more systematic testing techniques—and I'll show you how to do that.
Shopping for remote server providers is also a part of advanced Web design. You don't want to contract with a hosting service that won't provide all the features you need. We'll walk through what those are and how to make sure your host supports them. Then I'll show you how to use file management tools to upload your site.
We have a lot to cover today, so let's get started by talking about color schemes.
Defining and Applying a Color Scheme
Website color schemes are composed of five colors. Why do Web designers, who rarely agree on anything, agree on this? It's because you need five colors to distinguish different elements of your pages: banners, sidebars, text color, and so on. Generally, anything less than five colors makes your site look dull.
Why not use eight or nine colors, then? Constraining yourself to five colors gives your site a coherent theme. If there are more than five colors in your site design, visitors are overwhelmed with a cacophony of color. The site feels noisy and cluttered.
Tip
In Web design, black, white, and shades of gray or dark blue generally don't count. You can use them on top of and in addition to the colors in your color scheme.
I won't try to cram a color theory course into this short chapter, but here's the basic idea: Color schemes can be either complementary or harmonious.
Complementary color schemes involve mixing "opposite" colors from the standard color wheel. For example, you might build a color scheme around blue and orange, or you might prefer yellow and purple.
Complementary (opposite) colors on the color wheel
Here's a Web page that effectively uses complementary colors:
A website color scheme based on complementary colors
Another approach is to build harmonious color schemes around gradations of a color. For example, yellow, green, and blue are next to each other on the color wheel. You might build an effective color scheme based on gradations of those colors (like lime green and aqua).
Harmonious colors on the color wheel
And here's an example of how a harmonious color scheme can look:
Website with a harmonious color scheme
You can find many tools for generating color schemes online. The most powerful is Adobe's Kuler site. Kuler has been renamed Adobe Color CC since I wrote this lesson, but all the steps that follow work the same in the renamed "Color"-- just as they did in "Kuler." It's free (although additional features are available if you're using Adobe products). As part of your homework assignment, I'm going to have you create and apply a color scheme with Kuler. Let me walk you through that process now.
By the way, you'll notice in this lesson and in future lessons that I've included some live links that open in a new page. I wouldn't normally do this because it can be distracting, but I want you to be able to switch back and forth easily between our classroom and the sites you'll be working with.
To create a color scheme in Kuler, follow these steps:
Orange-based color schemes at Kuler
Color schemes based on an image
Defining colors for a color scheme
Muting colors in a color scheme
HSV? RGB?
When designers talk about value, they mean the lightness or darkness of a color. There are all kinds of ways to classify color values. HSV organizes them by hue (color), saturation (intensity), and value (brightness). RGB defines values by the amount of red, green, and blue in the mix. LAB defines by light, and then by A and B values that determine color. CMYK stands for cyan, magenta, yellow, and black, and it's a system for print colors rather than Web colors.
Hexadecimal color codes are the standard ones for Web design. A hexadecimal system has 16 digits rather than 10; usually, they're the digits 0 through 9 and the letters A through F. We'll retrieve our hexadecimal values when we insert our color scheme into our style sheet.
The image below shows how you can use RGB color values to define pure red: You assign a value of 255 to the Red channel, zero to the Green, and zero to the Blue. Changing the values will change the color.
Defining the color red using RGB color values
Copying a hexadecimal color value
A comment in a CSS file with hexadecimal color values
Let's use what you've just learned to spice up the page we created in Lesson 2.
Applying a Color Scheme
Now that we've pasted our color scheme hexadecimal values into a comment in our style sheet, we can replace the rather generic shades of gray in the page we created in the previous lesson with our own colors.
For handy reference, here's the HTML file we're using:
<!DOCTYPE HTML> <!--All page content is inside the HTML element--> <html> <!--Head element content is not visible in a browser window--> <head> <!--The UTF-8 character set provides the most support for all symbols and characters--> <meta charset="UTF-8"> <title>HTML Template</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <!--Content visible in the browser's window is inside the HTML element--> <body> <!--All our content is enclosed in the wrapper ID style--> <div id="wrapper"> <!--The banner ID style is inside the wrapper ID style--> <div id="banner"> <h1>Website for [your class nickname]</h1> </div> <!--left-column ID style is floated left and used for navigation--> <div id="left-column"> <h3>Links...</h3> <ul> <li> <a href="http://www.w3schools.com/">Reference: W3Schools</a></li> <li> <a href="feedback.html">Feedback Form</a></li> <li> <a href="video.html">Video</a></li> </ul> <!--right-column ID style is floated right and used for content--> </div> <div id="right-column"> <h2>Right Column Heading Here </h2> <p>Right column content here </p> <div class="box"><p>Box content</p></div> <div class="box"><p>Box content</p></div> <div class="box"><p>Box content</p></div> <div class="box"><p>Box content</p></div> <div class="box"><p>Box content</p></div> <div class="box"><p>Box content</p></div> </div> <!--The clear class style clears (removes) float--> <div class="clear"></div> <div id="footer"> <h5>Site by [your class nickname]</h5> </div> </div> </body> </html>
And here's the CSS style sheet we used:
@charset "UTF-8"; /* CSS Document */ /* Color scheme hexadecimal values: [paste your values here] */ /* The body tag style applies to all elements on the page */ body { background-color: black; font-family: Verdana, Geneva, Arial, sans-serif; padding:0px; margin:0px; } /* The wrapper ID style is used with a div tag to provide a 960px wide page */ #wrapper { width: 960px; height: 800px; margin-left: auto; margin-right: auto; background-color:LightSlateGrey ; } /* The right-column ID style is floated right */ #right-column { float: right; width: 600px; height: 600px; background-color:LightGray; } /* The left-column ID style is floated left */ #left-column { float: left; width: 360px; background-color:silver; height:600px; } /* Defining a style for a set of tags separated by commas applies the style to all tags */ h1,h2,h3,h4,h5,h6,p,li { margin-left:15px; margin-top:0px; margin-bottom:0px; } #footer { height:80px; } #banner{ height:120px; background-color:SlateGrey; } /* Defining a style for a set of tags not separated by commas applies the style only to all tags within the preceding tag*/ #banner h1 { color: white; } /* Advanced Web design relies on class or ID styles, never tables */ .box { height: 150px; width: 150px; float: left; background-color:tan; margin: 15px; opacity:.5; } /* The following pseudo-class applies to the box class when in a hovered state */ .box:hover { background-color:white; opacity:1; } /* This clear class style terminates float */ .clear{ clear: both; }
See the comment within the code that says [paste your values here]? That's the spot where you should replace the placeholder colors in the template with colors from your color scheme. To do that, place a pound symbol (#) in front of the hexadecimal value.
Here's an example of a custom color applied to the body element called background color:
body {
background-color: #BBCCB3;
font-family: Verdana, Geneva, Arial, sans-serif;
padding:0px;
margin:0px;
}
Experiment with a variety of color values from your color scheme in different elements.
We've Talked About Style, But What About Content?
Feel free to experiment with a bit of your own content in our HTML template. If you're comfortable with HTML text and images, you can customize our content now. Or you can just leave the placeholder text alone and focus on the techniques we're covering. Then later, at your leisure, you can experiment with customizing the content.
Once you've decided on the colors you'll use, you can start testing your site and fixing problems in it. Please join me in Chapter 3 to find out how.
Testing and Troubleshooting Your Site
Our site's almost ready to upload to the Web—but first we should test and troubleshoot it.
The most basic and important way to test a Web page is to save it in your code editor and open it with a browser (using File > Open or the equivalent in your browser menu). Beyond that, valuable online tools can validate (test) your code, your links, and the accessibility of your site.
Validating Your Code and Links
What if you open your Web page in a browser, and it doesn't look like it's supposed to? The problem could be an error in your HTML or CSS code. To troubleshoot, use an online validation system to identify errors.
To test HTML code, follow these steps:
Choosing to validate code by direct input
Validated code
Viewing HTML errors
Testing CSS Code
You can test CSS code the same way we just tested HTML code, but you'll use a different Web page at W3C. To test CSS, go to http://jigsaw.w3.org/css-validator/.
Just as we did with HTML, click the By Direct Input tab, and paste your CSS code into the box. Then click the Check button. The results will be either a Congratulations message or a list of errors with advice on how to fix them.
Viewing CSS errors
The W3C code validator tools for HTML and CSS are the secret weapons of every professional coder. Now that you know about these resources, you can save countless hours of troubleshooting trauma!
Why didn't anyone tell you about these earlier? As I say, they're the secret weapons of every professional coder . . . but now that's you.
Checking Links
W3C also provides a link-testing page, but it works only after you upload your site. So bookmark this page now, and use it later: http://validator.w3.org/checklink.
Link validation takes time because the validator searches your entire site and tries every link. When testing is complete, you can click the Go to the results link to see a list of errors. The link validator provides detailed explanations of what the problems are and how you can fix them.
Results of testing links
Now let's move on to a topic that seems minor but is actually important.
Checking Your Spelling
Misspelled words doom a website. They send a message that your message isn't worth taking seriously. And since I can't spell worth a darn, that's a big problem for me. Even if you're an excellent speller, it's a wise move to check your spelling before posting a site.
Many code editors include spell-checking for regular text. TextWrangler (my first choice for Mac) includes spell-checking, and plug-ins are available that add spell-checking to Notepad++ for Windows. Squiggly red underlining appears under suspected spelling errors, and you can view corrections by right-clicking (or CTRL + clicking on a Mac) on the underlined words.
Identifying and correcting spelling errors in TextWrangler
Will your website work for everyone who accesses it? Find out by using WAVE.
WAVE stands for Web Accessibility eValuation Tool. That site tests pages for accessibility. For example, will your website work well for hearing-impaired or sight-impaired people? Will color-blind people be able to comprehend the content? Will people with motor disabilities be able to navigate the pages?
To test your page in WAVE, go to http://wave.webaim.org/. The site works for uploaded pages only, so bookmark this link as well for future reference.
When you enter a URL in the WAVE site, you see an annotated version of the URL. WAVE identifies accessibility problems, and it highlights features that make a page more accessible. One of the most important accessibility features is proper use of ALT properties with images. Alt property values are short text strings that describe the image. Spaces, uppercase and lowercase characters, and special characters (like "&" or "!") are fine. Alt properties describe content to users who have limited vision.
Identifying a helpful ALT tag
Before we move on, try a game of Hangman to help you remember some of the terms in this chapter.
Ready to set up your remote hosting server? Please join me in Chapter 4.
Obtaining a Remote Hosting Server and Domain Name
Web hosting servers are computers that have massive capacity to store files, but not every computer with massive capacity is a Web hosting server. These servers include features that allow users to interact with your site—to watch video, for instance, or to post data in forms.
Some hosting packages limit how much content you can store at the site and how much bandwidth you can use. Making the right choices in hosting plans is a lot like choosing a good cellphone plan: You don't want to get socked with huge overage charges because you uploaded too much content or used too much bandwidth. So let's talk about your options.
The owners of hosting sites usually measure content in file size. You can use your operating system's file manager (like Windows Explorer or Finder on a Mac) to total the size of the files in the folder you've created for your Web pages. Based on that, you can get a sense of how much space you need.
Bandwidth is more complicated to measure and anticipate because it measures how much data transfers to and from your site. So if you have a video that has a small file size, but 100 million people download it, you're going to use a lot of bandwidth.
When in doubt, consult the staff at the hosting service to see what level of service is appropriate for your current and future needs.
Acquiring a Domain Name
When you buy a Web hosting service, the provider will set you up with an Internet Protocol (IP) address. But you'll want to connect that IP address to a domain name.
Domain names like cnn.com send users to a specific IP address. For example, the IP address for CNN is 157.166.226.26. Try it! Paste 157.166.226.26 into the address bar of any browser, and press RETURN or ENTER. You'll end up at CNN's site. But for obvious reasons, CNN (and everyone else) needs a domain name that's easier to remember than an IP address is.
To find out if a domain name is available, you can go to a domain registrar such as Network Solutions (http://www.networksolutions.com) or Instant Domain Search, a free service that checks availability of domain names (http://instantdomainsearch.com/). Enter the domain name you want in the search box at the site. You'll see a result like this:
Checking to see if a domain name is available
Network Solutions will offer to sell you an open domain name as soon as you find it. But don't buy it!
In many cases, when you sign up for a year or some other fixed period with a Web hosting company, they'll throw in free domain name registration. It's kind of like those free one-hour training sessions they package with a one-year membership at a gym. So use Network Solutions or a similar site to find available domain names . . . but then find a Web hosting package that registers the name for you at no additional charge.
The other advantage of registering your domain name as part of a package for Web hosting is that connecting your domain name with an IP address can be confusing. Rather than mess with that, let your hosting service handle the domain name registration for you as part of the sign-up deal.
Uploading Your Site
Now that we've surveyed the concepts involved in signing up for a Web hosting service, it's time for you to do this for real. In preparing the materials for this course, I tested a number of free Web hosting deals, and I found one that seems attractive. It includes a package that manages file transfers, which we'll explore in the next chapter. The host is 000webhost.com, with the first three numbers—zero, zero, zero—denoting the cost of hosting.
What's this company's hustle? It's pretty reasonable: The free service is restricted to limited server space and limited data transfer (what I referred to as bandwidth earlier), and you don't get free domain name registration with the free package. You also get limited email options and a simpler, less-friendly FTP program.
Without the free domain name registration, you'll probably end up with a domain name that includes the name of your hosting service—for example, http://yourname.hostingservicename.net/.
What if you already have an account with 000webhost? You can create a subdomain for your work in this course. That way you won't have to worry about mixing up your coursework for this class with other projects you've worked on.
Signing Up, Step by Step
To create a site for yourself, follow these steps:
Surveying Web hosting options at 000webhost.com
Finding the link to the CPanel
Navigating to account details at 000webhost.com
Opening the File Manager
Opening the public_html folder
Deleting the default home page
Uploading files to a 000webhost.com server
After the File Manager is done, the page displays a status report on the upload process. For example, you might see a message like this: "Checking files: File index.html is OK."
After the pages upload, go check out your site online!
If you uploaded your index.html page and deleted the default.php file provided by 000webhost.com, then your site should now be online and accessible. Spend some time navigating it, enjoying it, tweeting friends and relatives about it, and so on.
Inspecting an uploaded site
Congratulations! Now let's move on to Chapter 5, where we can review what you learned today.
Summary
In this lesson, we ranged from the artistic to the technical side of advanced Web design. And I'm glad we were able to do that in a single lesson, because aside from the specific techniques we covered, the experience gave you a feel for the back-and-forth between design and technology.
Some of us are more inclined to the coding side of Web design. Others of us are more attracted to the design side. But to be a successful Web designer today, you need to be at least conversant with both sides of the aisle.
If you're a coder by nature, you should understand something about the process of creating a color scheme. If you're a designer, you'll want to understand what's going on with coding—including how to apply a color scheme to a style sheet and how to test and troubleshoot code. And all of us benefit from an overview of how design and technique interact in advanced Web design.
Don't forget that you still have a quiz to complete for this lesson. I've also provided some helpful information in the Supplementary Material section and the FAQs. And you can always talk with me in the Discussion Area.
In our next lesson, I'll explain how to make your new site more attractive. We'll talk about the design side of things (creating a distinctive look through gradient backgrounds and custom fonts) and the coding side (using CSS3-based techniques to implement design features without increasing download time). See you in Lesson 4!
Adding spell-checking greatly enhances the value of Notepad++. This site walks you through that process.
When you paste text into the box at the site and click Spell Check, it indicates misspelled words with squiggly red underlining, just as programs like Microsoft Word do. You can right-click (CONTROL + click on a Mac) on a misspelled word to see corrected spelling options. Then you can go back into your HTML code and fix your typos.
Here's an alternate site for testing links. It has some features (like a fast checking option) that aren't available with the W3C link checker that we discussed in the lesson.
As I mentioned in Chapter 4, this free site is an alternative to Network Solutions. It searches for available domain names and provides extensive options for finding an available name that fits your site.
Wikipedia's article on the color wheel gets into the science and psychology of how and why colors appear to be "opposites."
The Wikipedia article on color theory provides a survey of the science, math, and psychology of color.
Here's a fine alternative to Adobe Kuler for designing color schemes.
These sites can provide you with inspiration.
In this article, designer and writer Joshua Johnson describes a variety of color-related tools and services, many of which are free.
Q: You provided us with a free hosting service. How much is a paid service, and what advantages are there to getting one?
A: Many quality hosting services, including FatCow, BlueHost, and GoDaddy, provide sites for about $5 per month. They generally provide free domain name registration, more email addresses, and more bandwidth and storage space than a free hosting service does. Q: What if I want to use a free domain host other than 000webhost.com for my class project?
A: You're welcome to do that! And I'd appreciate it if you share the link with us in the Discussion Area. There are many options for free hosting, but almost all of them either include ads, don't support the features we need for this class (like server-side PHP scripts), or are provided by social media sites that provide very little control over site content and appearance. Q: You seem to be arguing that we all need some understanding of design and technology. I'm a designer, so why can't I use a program like Dreamweaver to create all the code I need?
A: You can, but you'll still need to understand HTML and CSS if you want to be part of creating an advanced website. Many HTML and CSS attributes we'll use in this class can only be applied in Code view in Dreamweaver, which requires you to enter code more or less manually (with help from Dreamweaver's Code Hinting).
Here are the steps for this lesson's assignment:
Feel free to ask me questions in the Discussion Area or to post a message about which steps of the assignment were hardest or easiest for you.
Back to top